home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / font / kqdup110.zip / NODE.BAT < prev    next >
DOS Batch File  |  1991-11-05  |  2KB  |  48 lines

  1. :This batch file is intended to be used by nodes during a netmail run.
  2. :It will scan both the outgoing REP packet, and the incoming QWK packet.
  3. :It will most likely require editing to match your environment.
  4.  
  5. :Start by performing your normal mail export which generates a REP packet
  6. EXPORT
  7.  
  8. :After the REP packet is generated, extract the BBS_ID.REP packet putting it
  9. :into a temp sub-directory such as a RAM disk, scan it for duplicates, and
  10. :re-pack it into the REP packet. This prevents your system from re-exporting
  11. :messages back out to the network by mistake. As well as stopping the network
  12. :from sending your exported messages back to you by mistake
  13. IF NOT EXIST D:\QWKFILES\BBS_ID.REP GOTO NOREP
  14. PKUNZIP -o D:\QWKFILES\BBS_ID.REP BBS_ID.MSG D:\TEMPDIR
  15. KILLQDUP D:\TEMPDIR\BBS_ID.MSG -LOG:D:\LOGS\KILLQDUP.LOG -CF:NODEFILE.CRC
  16. IF ERRORLEVEL 1 GOTO NOREPDUPES
  17. PKZIP -m D:\QWKFILES\BBS_ID.REP D:\TEMPDIR\BBS_ID.MSG
  18. GOTO REPDUPEFOUND
  19. :NOREPDUPES
  20. DEL D:\TEMPDIR\BBS_ID.MSG
  21. :REPDUPEFOUND
  22. DEL D:\TEMPDIR\BBS_ID.BAK
  23. :NOREP
  24.  
  25. :Now that the REP packet has been scanned for duplicates, do your normal mail
  26. :run with your network mail HUB.
  27. PCPLUS -fHUBTRANS
  28.  
  29. :At this point, the REP packet should have been uploaded to your HUB (and
  30. :deleted by your script file), and a fresh QWK packet downloaded from your
  31. :HUB. Now to scan the new QWK packet for duplicates, preventing duplicates
  32. :from getting into your system from the HUB.
  33. IF NOT EXIST D:\QWKFILES\BBS_ID.QWK GOTO NOQWK
  34. PKUNZIP -o D:\QWKFILES\BBS_ID.QWK MESSAGES.DAT D:\TEMPDIR
  35. KILLQDUP D:\TEMPDIR\MESSAGES.DAT -LOG:D:\LOGS\KILLQDUP.LOG -CF:NODEFILE.CRC
  36. IF ERRORLEVEL 1 GOTO NOQWKDUPES
  37. PKZIP -m D:\QWKFILES\BBS_ID.QWK D:\TEMPDIR\MESSAGES.DAT
  38. GOTO QWKDUPEFOUND
  39. :NOQWKDUPES
  40. DEL D:\TEMPDIR\BBS_ID.MSG
  41. :QWKDUPEFOUND
  42. DEL D:\TEMPDIR\BBS_ID.BAK
  43. :NOQWK
  44.  
  45. :Now that the QWK packet has been scanned for duplicates, do your normal
  46. :mail import to put the remaining messages into your system.
  47. IMPORT
  48.